package com.llg.model.code;

public enum CommonCode implements ResultCode {
    SUCCESS(true,10000,"操作成功！"),
    UNAUTHENTICATED(false,10001,"此操作需要登陆系统！"),
    UNAUTHORISE(false,10002,"权限不足，无权操作！"),
    FAIL(false,12000,"操作失败！"),
    SERVER_ERROR(false,99999,"抱歉，系统繁忙，请刷新后重试！"),
    NO_EXIST_ID(false,12001,"不存在的id");

    private boolean success;
    private int code;
    private String message;

    CommonCode(boolean success, int code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }

    @Override
    public boolean success() {
        return success;
    }

    @Override
    public int code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
